﻿@{ 
    bool isArchive = "1".Equals(ViewData["showarchive"].ToString());
    ViewData["Title"] = isArchive ? "查看归档" : "打印表单";
}
<script>
    RoadUI.Core.showWait();
</script>
<style type="text/css" media="print">
    .Noprint { display: none; }
</style>
<div class="toolbar Noprint" style="margin-top:0; border-top:none 0; position:fixed; top:0; left:0; right:0; margin-left:auto; z-index:999; width:100%; margin-right:auto;">
    <input type="checkbox" value="1" checked="checked" onclick="printComment(this.checked);" id="printcomments" /><label for="printcomments">打印处理意见</label>
    <span class="toolbarsplit">&nbsp;</span>
    <a href="javascript:void(0);" onclick="printwindow();" title="">
        <i class='fa fa-print' style='font-size:14px;vertical-align:middle;margin-right:3px;'></i><label>打印</label>
    </a>
    <a href="javascript:void(0);" onclick="window.close();" title="">
        <i class='fa fa-remove' style='font-size:14px;vertical-align:middle;margin-right:3px;'></i><label>关闭窗口</label>
    </a>
</div>
<!--表单-->
<div id="rf_print_form_contents">
    @if ("1".Equals(ViewData["isCustomeForm"].ToString()))
    {
        <iframe src="@ViewData["formUrl"]" id="customeformiframe" style="border:none 0;padding:0;width:100%;margin-top:28px;"></iframe>
    }
    else
    {
        @(await Html.PartialAsync(ViewData["formUrl"].ToString()))
        <link href="~/RoadFlowResources/scripts/flowRun/form_print.css" rel="stylesheet" />
    }
</div>
<!--表单-->
<!--意见-->
<div id="rf_print_form_comments" style="width:95%; margin:0 auto;">
    @if (isArchive)
    {
    @Html.Raw(ViewData["comments"])
    }
    else
    {
    @(await Html.PartialAsync("Comments.cshtml"))
    }
</div>
<!--意见-->
<script type="text/javascript">
    $(window).load(function ()
    {
        new RoadUI.Window().close();
    });
    function printwindow()
    {
        window.print();
    }
    function printComment(checked)
    {
        if (checked)
        {
            $("#rf_print_form_comments").show();
        } else
        {
            $("#rf_print_form_comments").hide();
        }
    }
</script>

